//
//  User.m
//  掌上宏力
//
//  Created by admin on 2017/4/14.
//  Copyright © 2017年 admin. All rights reserved.
//

#import "User.h"

@implementation User

-(instancetype)initWithCoder:(NSCoder *)aDecoder{
    self = [super init];
    return [self yy_modelInitWithCoder:aDecoder];
}
-(void)encodeWithCoder:(NSCoder *)aCoder{
    [self yy_modelEncodeWithCoder:aCoder];
}
-(id)copyWithZone:(NSZone *)zone{
   return [self yy_modelCopy];
}
//[{"BM":"高基","YGXM":"高基","YGBH":155094,"HeadShipName":"(信息部)职员","DeptName":"河南宏力医院>>信息部","SSBM":"0604","HRM_USE":true,"RYZT_XX":"1","RYZT_YY":"0"}]
-(void)setUserInfoWithDictionary:(NSDictionary *)dic{
    self.username = dic[@"YGXM"];
    self.userId = dic[@"YGBH"];
    self.department = dic[@"DeptName"];
    self.job = dic[@"HeadShipName"];
 
}

+(User *)currentUser{
    return [LoginInfoTool sharedLoginInfoTool].currentUser;
}
-(NSString *)description{
    return [self yy_modelDescription];
}
@end
